package com.demo;

import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

@Service
@RocketMQMessageListener(
        topic = "my-topic-delay",
        consumerGroup = "my-group-delay"
)
public class MessageConsumer_delay implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        System.out.println("接收到消息: " + message + "，当前时间: " + System.currentTimeMillis());
    }
}